package com.link2room.quintesson.service;

import com.link2room.optimus.dto.result.base.L2REverydayPriceAndStockDto;
import com.link2room.optimus.dto.result.base.TaobaoXrateplanDto;
import com.link2room.quintesson.dto.result.base.TaobaoXrateplanHotelDto;
import com.link2room.quintesson.dto.result.manager.*;
import com.taobao.api.ApiException;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ITaobaoAPIService {

	/**
	 * 酒店上传
	 */
	TaobaoXhotelDto syncTaobaoXhotel(TaobaoXhotelDto taobaoXhotelDto)throws Exception;
	/**
	 * 房型更新
	 */
	TaobaoXroomtypeDto syncTaobaoXroomtype(TaobaoXroomtypeDto taobaoXroomtypeDto)throws Exception;
	/**
	 * 价格计划上传
	 */
	TaobaoXrateplanHotelDto syncTaobaoXrateplan(TaobaoXrateplanHotelDto taobaoXrateplanHotelDto, TaobaoXrateplanDto taobaoXrateplanDto)throws Exception;

	/**
	 * 商品上传
	 */
	TaobaoXrateDto syncTaobaoXrate(TaobaoXrateDto taobaoXrateDto, TaobaoXrateInventoryDto taobaoXrateInventoryDto, List<Map<String, String>> rateSwitchCal)throws Exception;
	/**
	 * 增量推送
	 */
	void syncTaobaoXratesIncrementRequest(String lhotelGroupCode, List<TaobaoRateInventoryPriceMap> taobaoRateInventoryPriceMapList) throws Exception;
	/**
	 * 组装商品明细
	 * @param l2REverydayPriceAndStockDtoList
	 * @return
	 * @throws Exception
	 */
	TaobaoRateDataDto composeTaobaoRateDataDto(List<L2REverydayPriceAndStockDto> l2REverydayPriceAndStockDtoList) throws Exception;

	/**
	 * 组装增量数据
	 * @param l2REverydayPriceAndStockDtoList
	 * @return
	 * @throws Exception
	 */
	TaobaoXrateInventoryDto composeIncrementTaobaoRatedata(List<L2REverydayPriceAndStockDto> l2REverydayPriceAndStockDtoList) throws Exception;

	void alipayfaceSettle(String lhotelGroupCode,
                          String terminalNo,
                          String l2rNo,
                          Date checkOut,
                          BigDecimal totalRoomFee,
                          BigDecimal otherFee) throws Exception;

	/**
	 * 信用住/面付订单状态更新接口
	 * @param xorder
	 * @throws ApiException
	 *//*
	public TaobaoXorder alipayfaceUpdate(TaobaoXorder xorder, TaobaoClient client)
			throws ApiException;

	*//**
	 * 信用住结账
	 * @param xorder
	 * @param client
	 * @return
	 * @throws ApiException
	 *//*
	public TaobaoXorder alipayfaceSettle(TaobaoXorder xorder, TaobaoClient client) throws ApiException;

	*//**
	 * 信用住撤销结账
	 * @param xorder
	 * @param client
	 * @return
	 * @throws ApiException
	 *//*
	public TaobaoXorder alipayfaceCancel(TaobaoXorder xorder, TaobaoClient client)throws ApiException;

	*//**
	 * 获取评价
	 * @param startDate
	 * @param client
	 * @return
	 * @throws Exception
     *//*
	public List<TradeRate> getTaobaoTraderates(Date startDate, TaobaoClient client)throws Exception;


	public Boolean explainTaobaoTraderate(TaobaoTraderates taobaoTraderates, TaobaoClient client)throws Exception;*/
}
